.\"
.\" Copyright (c) 2006-2017 Apple Inc. All rights reserved.
.\"
.\" Licensed under the Apache License, Version 2.0 (the "License");
.\" you may not use this file except in compliance with the License.
.\" You may obtain a copy of the License at
.\"
.\"     http://www.apache.org/licenses/LICENSE-2.0
.\"
.\" Unless required by applicable law or agreed to in writing, software
.\" distributed under the License is distributed on an "AS IS" BASIS,
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.\"
.\" The following requests are required for all man pages.
.Dd June 17, 2009
.Dt CALENDARSERVER_PURGE_ATTACHMENTS 8
.Os
.Sh NAME
.Nm calendarserver_purge_attachments
.Nd Calendar Server orphaned attachments clean-up utility
.Sh SYNOPSIS
.Nm
.Op Fl -config Ar file
.Op Fl -uuid Ar guid
.Op Fl -days Ar NUMBER
.Op Fl -dry-run
.Op Fl -verbose
.Op Fl -help
.Sh DESCRIPTION
.Nm
is a tool for removing attachments that are no longer referenced by
any calendar events, or only referenced by events older than a specified
cut-off.
.Pp
.Nm
should be run as a user with the same privileges as the Calendar
Server itself, as it needs to read and write data that belongs to the
server.
.Sh OPTIONS
.Bl -tag -width flag
.It Fl h, -help
Display usage information
.It Fl f, -config Ar FILE
Use the Calendar Server configuration specified in the given file.
Defaults to /etc/caldavd/caldavd.plist.
.It Fl u, -uuid Ar GUID
Target a specific user via their GUID.
.It Fl d, -days Ar NUMBER
Specify how many days in the past to retain.  Defaults to 365 days.
.It Fl n, -dry-run
Calculate and display how many orphaned attachments would be removed,
but don't actually remove them.
.It Fl v, -verbose
Print progress information.
.El
.Sh FILES
.Bl -tag -width flag
.It /etc/caldavd/caldavd.plist
The Calendar Server configuration file.
.El
.Sh SEE ALSO
.Xr caldavd 8
